package com.gxa.p2p.mapper;

import com.gxa.p2p.pojo.AccountInfo;
import com.gxa.p2p.pojo.UserInfo;
import com.gxa.p2p.pojo.Withdrawal;

import java.util.List;
import java.util.Map;

public interface WithdrawalMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Withdrawal record);

    int insertSelective(Withdrawal record);

    Withdrawal selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Withdrawal record);

    int updateByPrimaryKey(Withdrawal record);

    /**
     * 计算数据表总数和带条件的数据总数
     * @param map
     * @return
     */
    Integer count(Map<String,Object> map);

    /**
     *  分页查询和模糊查询方法
     * @param map 分页和模糊查询条件
     * @return 查询对象集合
     */
    List<Withdrawal> selectLimitLike(Map<String,Object> map);

    /**
     *  根据用户电话号码查询提现记录
     * @param userInfo 传入用户对象
     * @return 返回查询到的记录集合
     */
    List<Withdrawal> selectByPhoneNumber(UserInfo userInfo);

    List<Withdrawal> selectLike(Map<String,Object> map);
    //操作修改AccountInfo
    int updateAccountInfo (AccountInfo accountInfo);

    AccountInfo getAccountInfo (Integer userId);

    List<Withdrawal> selectAll();

    List<Withdrawal> selectLikeLimit(Map<String,Object> map);

}